package com.imooc.jms.producer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class APPProducer {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("producer.xml");
        ProduceService service = context.getBean(ProduceService.class);
        for (int i = 0; i < 100; i++) {
            service.sendMessage("test: " + i);
        }
        ((ClassPathXmlApplicationContext) context).close();
    }
}
